<%@include file="/WEB-INF/pages/commons/commons.jsp"%>

<fmt:message var="title" key="blog_edit_details.jsp.title" scope="request"/>
<stripes:layout-render name="${_themePath}/basic-layout-without-navbar.jsp" _title="${title}">


    <stripes:layout-component name="_topNav">
            <H1>Blog Management</H1>
            <UL class="gc-topnav-tabs">
                <LI>&nbsp;</LI>
            </UL>
    </stripes:layout-component>


    <stripes:layout-component name="_content">

        <h2>Edit Details</h2>
        <jsecurity:lacksPermission name="blog:editBlog:${actionBean.blog.id}">
            No "blog:editBlog:${actionBean.blog.id}" permisson
        </jsecurity:lacksPermission>

        <jsecurity:hasPermission name="blog:editBlog:${actionBean.blog.id}">
        <stripes:messages/>
        <stripes:errors globalErrorsOnly="true" />

        <stripes:useActionBean beanclass="foo.bar.blog.web.action.registered.BlogsProfileActionBean"
            alwaysExecuteEvent="true" event="allBlogThemeNames" validate="false"
            executeResolution="false" var="allBlogThemeNames"/>

        <stripes:form beanclass="foo.bar.blog.web.action.registered.BlogsProfileActionBean" method="POST">
            <stripes:errors/>
            <table width="100%">
            <input type="hidden" name="blog" value="${actionBean.blog.id}" />
            <tr>
                <td><stripes:label name="blog.id"/></td>
                <td><stripes:text name="blog.id" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.name"/></td>
                <td><stripes:text name="blog.name" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.description"/></td>
                <td><stripes:textarea name="blog.description" /></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.owner.username"/></td>
                <td><stripes:text name="blog.owner.username" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.creator"/></td>
                <td><stripes:text name="blog.creator.username" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.creationDate"/></td>
                <td><stripes:text name="blog.creationDate" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.modifier"/></td>
                <td><stripes:text name="blog.modifier.username" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.modificationDate"/></td>
                <td><stripes:text name="blog.modificationDate" disabled="true"/></td>
            </tr>
            <tr>
                <td><stripes:label name="blog.blogThemeName"/></td>
                <td>
                    <stripes:select name="blog.blogThemeName" multiple="false" value="${actionBean.blog.blogThemeName}">
                        <stripes:options-collection collection="${allBlogThemeNames.allBlogThemeNames}" />
                    </stripes:select>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <stripes:submit name="updateBlog"><fmt:message key="blog_edit_details.jsp.submit"/></stripes:submit>
                </td>
            </tr>
            </table>
        </stripes:form>
        </jsecurity:hasPermission>

    </stripes:layout-component>
</stripes:layout-render>

